﻿@using Sprint1.Models

@model IEnumerable<AnswerPoll>

@{
    ViewBag.Title = "Poll Choices";
}
<table border="1">
    <tr>
        <td colspan="2">
            <h2>Question @ViewBag.QuestionText</h2>
        </td>
    </tr>
    @foreach (var answer in @Model)
    {
        <tr>
            <td colspan="2">
                @Html.RadioButtonFor(ans => answer.Text, answer.Text) @answer.Text
            </td>

        </tr>

    }
    <tr>
        <td>
            @Html.ActionLink("Submit", "DetailsPostback", new { questionId = Model.ElementAt(0).QuestionId })
        </td>
        <td>
            @Html.ActionLink("Show Results", "Results", new { questionId = Model.ElementAt(0).QuestionId })
        </td>
    </tr>
</table>
